

let R = require('ramda');
let {Left,Right} = require('either');

// either :: (a -> c) -> (b -> c) -> Either a b -> c
module.exports = R.curry(function (f,g,e) {
    switch (e.constructor) {
        case Left:
            return f(e._value);
        case Right:
            return g(e._value);
    }
});

